<?php


/**
 * 订单物流表
 * Enter description here ...
 * @author Admin
 *
 */
class ExpressModel extends CommonModel {
	
	/**
	 * 获取竞拍物流数据列表
	 * @see CommonModel::getdata()
	 */
	public function getdata($map,$limit){
		$prefix = C('DB_PREFIX');
		$data = $this->Table("{$prefix}express as E")->
					   join("{$prefix}auction as A on E.aid = A.id")->
					   where($map)->field('E.*,A.sn')->
					   order('E.id desc')->limit($limit)->
					   findAll();
		return $data;
	}
	
	/**
	 * 获取竞拍物流数据总数
	 * @see CommonModel::getCount()
	 */
	public function getCount($map,$limit){
		$prefix = C('DB_PREFIX');
		$data = $this->Table("{$prefix}express as E")->
					   join("{$prefix}auction as A on E.aid = A.id")->
					   where($map)->limit($limit)->
					   count();
		return $data;
	}
	
	
}
?>